<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fastText: /data/users/cpuhrsch/fbsource/fbcode/deeplearning/fastText/src/productquantizer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="favicon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fastText
   &#160;<span id="projectnumber">d00d36476b15</span>
   </div>
   <div id="projectbrief">Fast text processing tool/library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('productquantizer_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">productquantizer.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="productquantizer_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef FASTTEXT_PRODUCT_QUANTIZER_H</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define FASTTEXT_PRODUCT_QUANTIZER_H</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;cstring&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;istream&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;ostream&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &lt;random&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="real_8h.html">real.h</a>&quot;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector_8h.html">vector.h</a>&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacefasttext.html">fasttext</a> {</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html">   24</a></span>&#160;<span class="keyword">class </span><a class="code" href="classfasttext_1_1ProductQuantizer.html">ProductQuantizer</a> {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#ac44db00342a54cb05df9d0c136a8633c">   26</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#ac44db00342a54cb05df9d0c136a8633c">nbits_</a> = 8;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#afa68c0f82fab09a93c2024a4dceecdf7">   27</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#afa68c0f82fab09a93c2024a4dceecdf7">ksub_</a> = 1 &lt;&lt; <a class="code" href="classfasttext_1_1ProductQuantizer.html#ac44db00342a54cb05df9d0c136a8633c">nbits_</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#ad439c3fefe554fa05f2b1d06ddcd77b6">   28</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#ad439c3fefe554fa05f2b1d06ddcd77b6">max_points_per_cluster_</a> = 256;</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a38780ae9c1997722683bb43d55ece633">   29</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#a38780ae9c1997722683bb43d55ece633">max_points_</a> = max_points_per_cluster_ * <a class="code" href="classfasttext_1_1ProductQuantizer.html#afa68c0f82fab09a93c2024a4dceecdf7">ksub_</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#ae71f8417a9265bdee493edfa6139d757">   30</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#ae71f8417a9265bdee493edfa6139d757">seed_</a> = 1234;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#afa968d226983fbebfd2bb9d80bf6571f">   31</a></span>&#160;    <span class="keyword">const</span> int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#afa968d226983fbebfd2bb9d80bf6571f">niter_</a> = 25;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a2334f23eb94911fa4b528a584eb7f7e4">   32</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a2334f23eb94911fa4b528a584eb7f7e4">eps_</a> = 1e-7;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#afdeec3948e983b1f3e1e36292153e300">   34</a></span>&#160;    int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#afdeec3948e983b1f3e1e36292153e300">dim_</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a1e09b5c96869b0b4758348b976152309">   35</a></span>&#160;    int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#a1e09b5c96869b0b4758348b976152309">nsubq_</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a9221f241be27487c671bbbba7a84b389">   36</a></span>&#160;    int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#a9221f241be27487c671bbbba7a84b389">dsub_</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#ae79be52ccbb6230ce129234e150bc826">   37</a></span>&#160;    int32_t <a class="code" href="classfasttext_1_1ProductQuantizer.html#ae79be52ccbb6230ce129234e150bc826">lastdsub_</a>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a56ed1ae67f47e95f2d1f4c6146d4913a">   39</a></span>&#160;    std::vector&lt;real&gt; <a class="code" href="classfasttext_1_1ProductQuantizer.html#a56ed1ae67f47e95f2d1f4c6146d4913a">centroids_</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#af5755b1c5ed3128430f1c1de2c03ac26">   41</a></span>&#160;    std::minstd_rand <a class="code" href="classfasttext_1_1ProductQuantizer.html#af5755b1c5ed3128430f1c1de2c03ac26">rng</a>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classfasttext_1_1ProductQuantizer.html#a08b62937f9073fb4d95f161da7121850">   44</a></span>&#160;    <a class="code" href="classfasttext_1_1ProductQuantizer.html#a08b62937f9073fb4d95f161da7121850">ProductQuantizer</a>() {}</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <a class="code" href="classfasttext_1_1ProductQuantizer.html#a08b62937f9073fb4d95f161da7121850">ProductQuantizer</a>(int32_t, int32_t);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>* <a class="code" href="classfasttext_1_1ProductQuantizer.html#adb6a2ade7e4a77d7b59f03c081d11d91">get_centroids</a> (int32_t, uint8_t);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>* <a class="code" href="classfasttext_1_1ProductQuantizer.html#adb6a2ade7e4a77d7b59f03c081d11d91">get_centroids</a>(int32_t, uint8_t) <span class="keyword">const</span>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a> <a class="code" href="classfasttext_1_1ProductQuantizer.html#aa957e4e92eb6111152f6e34b0b4a27cd">assign_centroid</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, <span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, uint8_t*, int32_t) <span class="keyword">const</span>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#aeba73a087e59f504472063db0a217e84">Estep</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, <span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, uint8_t*, int32_t, int32_t) <span class="keyword">const</span>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a5f6cc5e957f5546523aea7dd9e826f25">MStep</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, <span class="keyword">const</span> uint8_t*, int32_t, int32_t);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a06c91357dc88225714daa10548525352">kmeans</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, int32_t, int32_t);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a40e3090d1f7e525c3e9787d9856d3b7d">train</a>(<span class="keywordtype">int</span>, <span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a82e0fb5da37c5c6a62d6f9f6d34d91d6">mulcode</a>(<span class="keyword">const</span> <a class="code" href="classfasttext_1_1Vector.html">Vector</a>&amp;, <span class="keyword">const</span> uint8_t*, int32_t, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#ac0039e0eccfc7dc15ddb3be3bac0fec3">addcode</a>(<a class="code" href="classfasttext_1_1Vector.html">Vector</a>&amp;, <span class="keyword">const</span> uint8_t*, int32_t, <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>) <span class="keyword">const</span>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a1b6fedf0a199ed0ec1afc2aea26a4b37">compute_code</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, uint8_t*)  <span class="keyword">const</span>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#aca0eb5cd10d5bba60b4f3f37f87676f6">compute_codes</a>(<span class="keyword">const</span> <a class="code" href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">real</a>*, uint8_t*, int32_t)  <span class="keyword">const</span>;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a6e4d58883fb38225c6f4731770b89274">save</a>(std::ostream&amp;);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classfasttext_1_1ProductQuantizer.html#a4060617809c0099a9e5ca73ec0497056">load</a>(std::istream&amp;);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a82e0fb5da37c5c6a62d6f9f6d34d91d6"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a82e0fb5da37c5c6a62d6f9f6d34d91d6">fasttext::ProductQuantizer::mulcode</a></div><div class="ttdeci">real mulcode(const Vector &amp;, const uint8_t *, int32_t, real) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:149</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a5f6cc5e957f5546523aea7dd9e826f25"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a5f6cc5e957f5546523aea7dd9e826f25">fasttext::ProductQuantizer::MStep</a></div><div class="ttdeci">void MStep(const real *, real *, const uint8_t *, int32_t, int32_t)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:67</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a1e09b5c96869b0b4758348b976152309"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a1e09b5c96869b0b4758348b976152309">fasttext::ProductQuantizer::nsubq_</a></div><div class="ttdeci">int32_t nsubq_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:35</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a06c91357dc88225714daa10548525352"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a06c91357dc88225714daa10548525352">fasttext::ProductQuantizer::kmeans</a></div><div class="ttdeci">void kmeans(const real *, real *, int32_t, int32_t)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:113</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a6e4d58883fb38225c6f4731770b89274"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a6e4d58883fb38225c6f4731770b89274">fasttext::ProductQuantizer::save</a></div><div class="ttdeci">void save(std::ostream &amp;)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:192</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_aa957e4e92eb6111152f6e34b0b4a27cd"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#aa957e4e92eb6111152f6e34b0b4a27cd">fasttext::ProductQuantizer::assign_centroid</a></div><div class="ttdeci">real assign_centroid(const real *, const real *, uint8_t *, int32_t) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:43</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_adb6a2ade7e4a77d7b59f03c081d11d91"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#adb6a2ade7e4a77d7b59f03c081d11d91">fasttext::ProductQuantizer::get_centroids</a></div><div class="ttdeci">real * get_centroids(int32_t, uint8_t)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:38</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_ae71f8417a9265bdee493edfa6139d757"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#ae71f8417a9265bdee493edfa6139d757">fasttext::ProductQuantizer::seed_</a></div><div class="ttdeci">const int32_t seed_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:30</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html">fasttext::ProductQuantizer</a></div><div class="ttdef"><b>Definition:</b> productquantizer.h:24</div></div>
<div class="ttc" id="namespacefasttext_html"><div class="ttname"><a href="namespacefasttext.html">fasttext</a></div><div class="ttdef"><b>Definition:</b> args.cc:17</div></div>
<div class="ttc" id="classfasttext_1_1Vector_html"><div class="ttname"><a href="classfasttext_1_1Vector.html">fasttext::Vector</a></div><div class="ttdef"><b>Definition:</b> vector.h:23</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_afa968d226983fbebfd2bb9d80bf6571f"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#afa968d226983fbebfd2bb9d80bf6571f">fasttext::ProductQuantizer::niter_</a></div><div class="ttdeci">const int32_t niter_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:31</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a9221f241be27487c671bbbba7a84b389"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a9221f241be27487c671bbbba7a84b389">fasttext::ProductQuantizer::dsub_</a></div><div class="ttdeci">int32_t dsub_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:36</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_ac0039e0eccfc7dc15ddb3be3bac0fec3"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#ac0039e0eccfc7dc15ddb3be3bac0fec3">fasttext::ProductQuantizer::addcode</a></div><div class="ttdeci">void addcode(Vector &amp;, const uint8_t *, int32_t, real) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:164</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a2334f23eb94911fa4b528a584eb7f7e4"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a2334f23eb94911fa4b528a584eb7f7e4">fasttext::ProductQuantizer::eps_</a></div><div class="ttdeci">const real eps_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:32</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_af5755b1c5ed3128430f1c1de2c03ac26"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#af5755b1c5ed3128430f1c1de2c03ac26">fasttext::ProductQuantizer::rng</a></div><div class="ttdeci">std::minstd_rand rng</div><div class="ttdef"><b>Definition:</b> productquantizer.h:41</div></div>
<div class="ttc" id="real_8h_html"><div class="ttname"><a href="real_8h.html">real.h</a></div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a56ed1ae67f47e95f2d1f4c6146d4913a"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a56ed1ae67f47e95f2d1f4c6146d4913a">fasttext::ProductQuantizer::centroids_</a></div><div class="ttdeci">std::vector&lt; real &gt; centroids_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:39</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_ae79be52ccbb6230ce129234e150bc826"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#ae79be52ccbb6230ce129234e150bc826">fasttext::ProductQuantizer::lastdsub_</a></div><div class="ttdeci">int32_t lastdsub_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:37</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_aca0eb5cd10d5bba60b4f3f37f87676f6"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#aca0eb5cd10d5bba60b4f3f37f87676f6">fasttext::ProductQuantizer::compute_codes</a></div><div class="ttdeci">void compute_codes(const real *, uint8_t *, int32_t) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:185</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_afdeec3948e983b1f3e1e36292153e300"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#afdeec3948e983b1f3e1e36292153e300">fasttext::ProductQuantizer::dim_</a></div><div class="ttdeci">int32_t dim_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:34</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a40e3090d1f7e525c3e9787d9856d3b7d"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a40e3090d1f7e525c3e9787d9856d3b7d">fasttext::ProductQuantizer::train</a></div><div class="ttdeci">void train(int, const real *)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:128</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a1b6fedf0a199ed0ec1afc2aea26a4b37"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a1b6fedf0a199ed0ec1afc2aea26a4b37">fasttext::ProductQuantizer::compute_code</a></div><div class="ttdeci">void compute_code(const real *, uint8_t *) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:177</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a38780ae9c1997722683bb43d55ece633"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a38780ae9c1997722683bb43d55ece633">fasttext::ProductQuantizer::max_points_</a></div><div class="ttdeci">const int32_t max_points_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:29</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_afa68c0f82fab09a93c2024a4dceecdf7"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#afa68c0f82fab09a93c2024a4dceecdf7">fasttext::ProductQuantizer::ksub_</a></div><div class="ttdeci">const int32_t ksub_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:27</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_ac44db00342a54cb05df9d0c136a8633c"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#ac44db00342a54cb05df9d0c136a8633c">fasttext::ProductQuantizer::nbits_</a></div><div class="ttdeci">const int32_t nbits_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:26</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_ad439c3fefe554fa05f2b1d06ddcd77b6"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#ad439c3fefe554fa05f2b1d06ddcd77b6">fasttext::ProductQuantizer::max_points_per_cluster_</a></div><div class="ttdeci">const int32_t max_points_per_cluster_</div><div class="ttdef"><b>Definition:</b> productquantizer.h:28</div></div>
<div class="ttc" id="vector_8h_html"><div class="ttname"><a href="vector_8h.html">vector.h</a></div></div>
<div class="ttc" id="namespacefasttext_html_a7afdad102f318271c14154b8e65e5ea3"><div class="ttname"><a href="namespacefasttext.html#a7afdad102f318271c14154b8e65e5ea3">fasttext::real</a></div><div class="ttdeci">float real</div><div class="ttdef"><b>Definition:</b> real.h:15</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a08b62937f9073fb4d95f161da7121850"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a08b62937f9073fb4d95f161da7121850">fasttext::ProductQuantizer::ProductQuantizer</a></div><div class="ttdeci">ProductQuantizer()</div><div class="ttdef"><b>Definition:</b> productquantizer.h:44</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_aeba73a087e59f504472063db0a217e84"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#aeba73a087e59f504472063db0a217e84">fasttext::ProductQuantizer::Estep</a></div><div class="ttdeci">void Estep(const real *, const real *, uint8_t *, int32_t, int32_t) const</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:59</div></div>
<div class="ttc" id="classfasttext_1_1ProductQuantizer_html_a4060617809c0099a9e5ca73ec0497056"><div class="ttname"><a href="classfasttext_1_1ProductQuantizer.html#a4060617809c0099a9e5ca73ec0497056">fasttext::ProductQuantizer::load</a></div><div class="ttdeci">void load(std::istream &amp;)</div><div class="ttdef"><b>Definition:</b> productquantizer.cc:200</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="productquantizer_8h.html">productquantizer.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
